package com.jinzhi.jinzhidata.service.impl;

import com.jinzhi.jinzhidata.dataobject.CarouselFigure;
import com.jinzhi.jinzhidata.repository.CarouselFigureRepository;
import com.jinzhi.jinzhidata.service.CarouselFigureService;
import com.jinzhi.jinzhidata.vo.ListCarouselFigureVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description
 * @date 2020-01-19 13:04
 **/
@Service
public class CarouselFigureServiceImpl implements CarouselFigureService {

    @Autowired
    CarouselFigureRepository carouselFigureRepository;

    @Override
    public List<ListCarouselFigureVO> selectList() {
        return carouselFigureRepository.selectList();
    }

    @Override
    public void deleteById(String carouselFigureId) {
        carouselFigureRepository.deleteById(carouselFigureId);
    }

    @Override
    public Long count() {
        return carouselFigureRepository.count();
    }

    @Override
    public CarouselFigure save(CarouselFigure carouselFigure) {
        return carouselFigureRepository.save(carouselFigure);
    }
}
